package sg.nus.iss.vmcs.guilisteners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import sg.nus.iss.vmcs.controllers.TransactionController;

/**
 * Action Listener for the Terminate Button on the Customer UI
 * @author Philip Chew
 */
public class TerminateButtonListener implements ActionListener {
	
	/** Transaction Controller */
	private TransactionController transCtrl;

	/**
	 * Creates an instance of the Terminate Button Listener
	 * @param transCtrl Reference to the Transaction Controller
	 */
	public TerminateButtonListener(TransactionController transCtrl) {
		this.transCtrl = transCtrl;
	}
	
	@Override
	public void actionPerformed(ActionEvent arg0) {
		transCtrl.terminateTransaction();
	}
}
